package thread;

public class ThreadTest extends  Thread{

    @Override
    public void run() {

        //线程要执行的内容，在重写run方法中实现
        System.out.println("开始执行线程："+Thread.currentThread().getName());
        int count =0;
        for(int i=0;i<10;i++){
            count ++;
            System.out.println("count:"+count);
        }
        System.out.println("结束执行线程："+Thread.currentThread().getName());
    }

    public static void main(String[] args) {

        ThreadTest threadTest =new ThreadTest();
        //开启线程
        threadTest.start();

    }


}
